class Koa {
  constructor(){
    this.middlewares = []
  }
  use(fn){
    this.middlewares.push(fn)
  }
}

const app = new Koa()
app.use((ctx, next) => {

})
console.log(app.middlewares.length)
console.log(app.middlewares[0].toString())